<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>我的客户</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css"/>
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css"/>
    <link rel="stylesheet" href="/css/skin.css"/>
    <!--固定table列-->
    <link href="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/css/customerManager/user/myCustomerPool.css"/>
    <link rel="stylesheet" href="/css/customerManager/user/myCustomerPoolTable.css"/>
    <style>
        .selector-box dl {
            padding-left: 70px;
        }
    </style>
</head>
<body>
<div class="container-fluid customer-page">
    <div class="card">
        <div class="card-header">
            <h1>我的客户</h1>
            <button type="button" data-toggle="modal" data-target="#editTags" class="btn btn-link"><label><i class="mdi mdi-tag-plus"></i></label>设置客户快捷标签</button>
            <div class="card-actions">
                <div class="min-search">
                    <input class="form-control" type="text" placeholder="请输入客户名称/关键字" id="customerNameMin" name="customerNameMin">
                    <button class="btn btn-primary" type="button" onclick="searchMyCustomerPool('basics')"><i class="mdi mdi-magnify"></i><span>搜索</span></button>
                </div>
            </div>
        </div>
        <div class="card-body">
            <!--标签类型-->
            <input type="text" name="tabType" value="9" id="tabType" hidden>
            <input type="hidden" th:value="${accountId}" id="accountId">
            <input type="hidden" th:value="${esurl}" id="esurl">
            <ul class="new-tabs" id="tabsBar" style="margin-top: -14px;">
                <li class="nav-item"><a href="#!" data-value="0">全部</a></li>
                <li class="nav-item"><a href="#!" data-value="1">我领取的客户</a></li>
                <li class="nav-item"><a href="#!" data-value="2">分配给我的客户</a></li>
                <li class="nav-item"><a href="#!" data-value="3">我自建的客户</a></li>
                <li class="nav-item"><a href="#!" data-value="8">个人客户</a></li>
                <li class="nav-item line"><a href="#!" data-value="4">意向客户</a></li>
                <!--<li class="nav-item"><a href="#!" data-value="5">新单客户</a></li>
                <li class="nav-item"><a href="#!" data-value="6">续费客户</a></li>-->
                <li class="nav-item"><a href="#!" data-value="10">会员客户</a></li>
                <li class="nav-item"><a href="#!" data-value="7">流失客户</a></li>
                <li class="nav-item active"><a href="#!" data-value="9">未成交客户</a></li>
            </ul>
            <div class="well filter-well" id="screenWell">
                <div class="row">
                    <div class="col-xs-3 group">
                        <label>所在行业：</label>
                        <div>
                            <select name="screenIndustry" id="screenIndustry" class="form-control ">
                                <option value="" selected>不限</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-xs-3 group">
                        <label>所在省份：</label>
                        <div>
                            <select name="screenProvince" title="不限" id="screenProvince" class="form-control" onchange="changeProvince()">
                                <option value="" selected>不限</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-xs-3 group">
                        <label>所在市：</label>
                        <div>
                            <select name="screenCity" title="不限" id="screenCity" class="form-control" onchange="changeCity()">
                                <option value="" selected>不限</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-xs-3 group">
                        <label>所在区/县：</label>
                        <div>
                            <select name="screenCounty" title="不限" id="screenCounty" class="form-control ">
                                <option value="" selected>不限</option>
                            </select>
                        </div>
                    </div>
                    <!--<div class="col-xs-3 group">
                        <label>参加活动：</label>
                        <div>
                            <select name="screenActivities" id="screenActivities" title="请选择" class="form-control ">
                            </select>
                        </div>
                    </div>
                    <div class="col-xs-3 group">
                        <label>成交产品类型：</label>
                        <div>
                            <select name="screenProvince" id="screenProvince" title="请选择成交产品类型" class="form-control">
                                <option value="" selected>不限</option>
                                <option value="">高会</option>
                                <option value="">中级</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-xs-3 group">
                        <label>保护状态：</label>
                        <div>
                            <select name="screenPost" id="screenPost" title="请选择保护状态" class="form-control">
                                <option value="" selected>不限</option>
                                <option value="">已保护</option>
                                <option value="">未保护</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-xs-3 group">
                        <label>优惠券：</label>
                        <div>
                            <select name="screenPost" id="screenPost" title="请选择职务类型" class="form-control">
                                <option value="" selected>不限</option>
                                <option value="">已使用</option>
                                <option value="">未使用</option>
                            </select>
                        </div>
                    </div>-->
                </div>
                <div class="row" style="display: none;">
                    <div class="col-xs-3 group">
                        <label>跟进状态：</label>
                        <div>
                            <select name="followStatus" id="followStatus" title="不限" class="form-control ">
                                <option value="">不限</option>
                                <option value="1">拜访过</option>
                                <option value="2">未跟进</option>
                                <option value="3">未拜访</option>
                                <option value="4">跟进次数大于10次</option>
                                <option value="5">跟进次数小于10次</option>
                                <option value="6">线上电话大于10次</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-xs-3 group">
                        <label>选择标签：</label>
                        <div>
                            <select name="screenHotTag" id="screenHotTag" class="form-control " title="不限" data-selected-text-format="count" data-live-search="true" data-actions-box="true" multiple>
                                <option value="" selected>不限</option>
                            </select>
                            <!--<select name="" id="" title="请选择" class="form-control" multiple data-selected-text-format="count" data-actions-box="true">
                                &lt;!&ndash;                                <option value="">不限</option>&ndash;&gt;
                                <optgroup label="自定义快捷标签">
                                    <option value="">自定义标签1</option>
                                    <option value="">自定义标签2</option>
                                    <option value="">自定义标签3</option>
                                </optgroup>
                                <optgroup label="系统标签">
                                    <option value="">系统标签1</option>
                                    <option value="">系统标签2</option>
                                    <option value="">系统标签3</option>
                                </optgroup>
                                <optgroup label="自由设置标签" data-max-options="2">
                                    <option value="">自由设置标签1</option>
                                    <option value="">自由设置标签2</option>
                                    <option value="">自由设置标签3</option>
                                </optgroup>
                            </select>-->
                        </div>
                    </div>
                    <!--<div class="col-xs-3 group">
                        <label>联系人数量：</label>
                        <div class="input-group">
                            <div class="input-group-btn">
                                <select id="contactPersonCountSel" class="form-control">
                                    <option value="1">大于</option>
                                    <option value="2">小于</option>
                                    <option value="3">等于</option>
                                </select>
                            </div>
                            <input class="form-control " type="text" placeholder="人数" id="contactPersonCountInp" name="contactPersonCountInp"  autocomplete="off" oninput="value=value.replace(/[^\d]/g,'')"  maxlength="10">
                        </div>
                    </div>-->
                    <div class="col-xs-3 group">
                        <label>会员类型：</label>
                        <div>
                            <select name="memberType" id="memberType" title="不限" class="form-control ">
                                <option value="" selected>不限</option>
                                <option value="1">会员续费</option>
                                <option value="0">会员新单</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-xs-3 group">
                        <label>会员到期时间：</label>
                        <div>
                            <select name="memberExpTime" id="memberExpTime" title="不限" class="form-control ">
                                <option value="" selected>不限</option>
                                <option value="6">6个月内到期</option>
                                <option value="5">3个月内到期</option>
                                <option value="4">1个月内到期</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-xs-6 group">
                        <label>会员合同时间：</label>
                        <div class="form-content input-group">
                            <input id="createTmStart" type="text" class="form-control date-input" placeholder="起">
                            <span class="input-group-addon">至</span>
                            <input type="text" id="createTmEnd" class="form-control date-input" placeholder="止">
                        </div>
                    </div>
                    <div class="col-xs-6 group">
                        <label>会员成交时间：</label>
                        <div class="form-content input-group">
                            <input id="transactionTmStart" type="text" class="form-control date-input" placeholder="起">
                            <span class="input-group-addon">至</span>
                            <input type="text" id="transactionTmEnd" class="form-control date-input " placeholder="止">
                        </div>
                    </div>
                    <div class="col-xs-6 group" id="receiveLabel" style="display: none;">
                        <label>客户领取时间：</label>
                        <div class="form-content input-group">
                            <input id="receiveTmStart" type="text" class="form-control date-input" placeholder="起">
                            <span class="input-group-addon">至</span>
                            <input type="text" id="receiveTmEnd" class="form-control date-input" placeholder="止">
                        </div>
                    </div>
                    <div class="col-xs-6 group" id="creatCustomerLabel" style="display: none;">
                        <label>客户创建时间：</label>
                        <div class="form-content input-group">
                            <input id="creatCustomerTmStart" type="text" class="form-control date-input" placeholder="起">
                            <span class="input-group-addon">至</span>
                            <input type="text" id="creatCustomerTmEnd" class="form-control date-input" placeholder="止">
                        </div>
                    </div>
                    <div class="col-xs-3 group">
                        <label>财务人数：</label>
                        <div class="input-group">
                            <div class="input-group-btn">
                                <select id="financialNumberSel" class="form-control">
                                    <option value="1">大于</option>
                                    <option value="2">小于</option>
                                    <option value="3">等于</option>
                                </select>
                            </div>
                            <input class="form-control " type="text" placeholder="人数" id="financialNumberInp" name="financialNumberInp"  autocomplete="off" oninput="value=value.replace(/[^\d]/g,'')"  maxlength="10">
                        </div>
                    </div>
                    <div class="col-xs-3 group">
                        <label>参保人数：</label>
                        <div class="input-group">
                            <div class="input-group-btn">
                                <select id="insuredNumberSel" class="form-control">
                                    <option value="1">大于</option>
                                    <option value="2">小于</option>
                                    <option value="3">等于</option>
                                </select>
                            </div>
                            <input class="form-control " type="text" placeholder="人数" id="insuredNumberInp" name="insuredNumberInp"  autocomplete="off" oninput="value=value.replace(/[^\d]/g,'')"  maxlength="10">
                        </div>
                    </div>
                    <!--<div class="col-xs-3 group">
                        <label>会员产品类型：</label>
                        <div>
                            <select name="" id="" title="请选择" class="form-control">
                                <option value="">不限</option>
                                <option value=""></option>
                            </select>
                        </div>
                    </div>
                    <div class="col-xs-3 group">
                        <label>会员消费：</label>
                        <div>
                            <select name="" id="" title="请选择" class="form-control">
                                <option value="" selected>不限</option>
                                <option value="">剩余次数小于5次</option>
                                <option value="">剩余次数大于4次</option>
                                <option value="">已全部消耗</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-xs-3 group">
                        <label>行业会消费：</label>
                        <div>
                            <select name="" id="" title="请选择" class="form-control">
                                <option value="" selected>不限</option>
                                <option value="">全部消费</option>
                                <option value="">部分消费</option>
                                <option value="">未消费</option>
                            </select>
                        </div>
                    </div>-->
                </div>
                <a href="#!" class="active">展开<i class="mdi mdi-chevron-down"></i></a>
            </div>
            <table id="dataInfo"></table>
        </div>
    </div>
</div>

<!-- 客户状态修改弹层 -->
<div class="modal fade" tabindex="-1" role="dialog" id="customerStatusModel">
    <div class="modal-dialog modal-lg" role="document" style="width: 650px;">
        <div class="modal-content">
            <div class="modal-body" style="min-height: 210px;">
                <!-- start -->
                <div class="card-header">
                    <h1>客户类别修改</h1>
                </div>
                <form class="form-horizontal">
                    <input type="hidden" id="customerId" name="customerId">
                    <label class="col-sm-4 control-label">客户类别：</label>
                    <div class="col-sm-5">
                        <select class="form-control" id="customerState" type="text">
                            <option value="">请选择客户类别</option>
                            <option value="1">意向客户</option>
                            <option value="2">新单客户</option>
                            <option value="3">续费客户</option>
                            <option value="4">流失客户</option>
                        </select>
                    </div>
                </form>
                <div style="width: 100%;display: flex;justify-content: center; margin-top: 60px;">
                    <div type="button" class="btn btn-primary" onclick="updateCustomerState()" style="margin-right: 20px;">确定</div>
                    <div type="button" class="btn btn-default" data-dismiss="modal">取消</div>
                </div>
                <!-- end -->
            </div>
        </div>
    </div>
</div>
<!-- 模态框 释放 -->
<div class="modal fade" tabindex="-1" role="dialog" id="releaseCustomerModal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-body" style="min-height: 200px;">
                <!-- start -->
                <h4 style="line-height: 40px;font-size: 14px;font-weight: bold;">请输入释放原因</h4>
                <form class="form-horizontal">
                    <textarea class="form-control" id="releaseReason" name="releaseReason" rows="6" placeholder="请输入释放原因"></textarea>
                </form>
                <div style="width: 100%;display: flex;justify-content: center; margin-top: 30px;">
                    <div class="btn btn-primary" style="margin-right: 20px;" onclick="releaseCustomer()">确定</div>
                    <div type="button" class="btn btn-default" data-dismiss="modal">取消</div>
                </div>
                <!-- end -->
            </div>
        </div>
    </div>
</div>
<!-- 标签 -->
<div class="modal fade" role="dialog" id="editTags">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>快捷标签</h4>
            </div>
            <div class="modal-body">
                <table id="tagsTable"></table>
            </div>
            <div class="modal-footer">
                <span class="pull-left" style="line-height: 34px;">最多只能添加10个标签</span>
                <button type="button" class="btn btn-success btn-label" onclick="addTags();"><label><i class="mdi mdi-plus"></i></label>新增标签</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<!--标签插件-->
<script src="/js/jquery-tags-input/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.min.js"></script>
<script src="/js/crm/common/city.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<!-- 图表 -->
<script type="text/javascript" src="/js/echarts.min.js"></script>
<!--table固定列-->
<script type="text/javascript" src="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js"></script>
<!-- 通用js -->
<script src="/js/crm/common/common.js"></script>
<!-- 拖动 -->
<script src="/js/bootstrap-table/extensions/resizable/bootstrap-table-resizable.min.js"></script>
<script src="/js/crm/common/colResizable-1.6.min.js"></script>
<script type="text/javascript" src="/js/crm/common/lightyear.js"></script>
<!-- 子页面公用js -->
<script src="/js/crm/common/pageCommon.js"></script>
<script src="/js/crm/customerManager/user/myCustomerPool.js"></script>
</html>